package com.dg.cuckoo.admin.repository;

import com.dg.cuckoo.admin.dto.proCarryOut.ProCarryOutDto;
import com.dg.cuckoo.core.BaseRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ProCarryOutRepository extends BaseRepository<ProCarryOutDto,String> {

    List<ProCarryOutDto> findByProjectIdAndType(String project,Integer type);

    @Query(value = "select * from pro_carry_out where type=? and project_id=? limit ?,?",nativeQuery = true)
    List<ProCarryOutDto> page(Integer type,String projectId,Integer page,Integer pageSize);

    List<ProCarryOutDto> findByProjectId(String projectId);
}
